import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import "@/assets/css/new_file.css"
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
import axios from '@/http'
import * as echarts from 'echarts';

Vue.use(ElementUI);
Vue.config.productionTip = false
Vue.prototype.$axios = axios
Vue.prototype.$echarts = echarts

Vue.filter('dataForm',function(v){
  // 把时间戳转换为时间格式
  const dt=new Date(v)
  const y=dt.getFullYear()  //年份
  // padStart在指定字符前面加 '0'
  const m=(dt.getMonth()+1+"").padStart(2,'0')  //月份
  
  const d=(dt.getDate()+"").padStart(2,'0')   //日
  const hh=(dt.getHours()+"").padStart(2,'0')   //时
  const mm=(dt.getMinutes()+"").padStart(2,'0')   //分
  const ss=(dt.getSeconds()+"").padStart(2,'0')   //秒

  return `${y}-${m}-${d} ${hh}:${mm}:${ss}`
})

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
